package com.weaver.drools.common.shiro.filter;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
import org.apache.shiro.web.util.WebUtils;
import org.hibernate.annotations.Filter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * 
 * @application name：
 * @author: zhouxinlei
 * @time：2018年7月18日 @version：ver 1.1
 */
@Filter(name = "MyFormAuthenticationFilter")
public class MyFormAuthenticationFilter extends FormAuthenticationFilter {
	private static final Logger log = LoggerFactory.getLogger(MyFormAuthenticationFilter.class);
	private final String successUrl = "/index";
	@Override
	protected void issueSuccessRedirect(ServletRequest request, ServletResponse response) throws Exception {
		log.info("================登陆成功=================");
		WebUtils.issueRedirect(request, response, successUrl, null, true);
	}

}
